#include "Period.h"

Period::Period(double a, double b)
{
    Re=a;
    Im=b;

}

Compl Compl::operator*(Compl z)
{
    double x=Re*z.Re-z.Im*Im;
    double y=(Re*z.Im+Im*z.Re);
    return Compl(x,y);
};


std::ostream & operator<<(std::ostream &out, const Compl &x)
{
    if(x.Im>0)
    {
        out<<x.Re<<"+i"<<x.Im;
    }
    else
    {
        out<<x.Re<<"-i"<<-x.Im<<'\n';
    }
    return out;
};


